package practice6;

public class App {
    public static void main(String[] args) {
        // 创建矩形的实例
        Shape rectangle = new Rectangle(5, 10);
        // 创建圆形的实例
        Shape circle = new Circle(7);

        // 打印矩形的面积和周长
        System.out.println("矩形的面积: " + rectangle.area());
        System.out.println("矩形的周长: " + rectangle.perimeter());

        // 打印圆形的面积和周长
        System.out.println("圆形的面积: " + circle.area());
        System.out.println("圆形的周长: " + circle.perimeter());
    }
}
